home *** CD-ROM | disk | FTP | other *** search
- Path: news.ichange.com!newsmaster
- From: Jesse Liberty <jl@staff.ichange.com>
- Newsgroups: comp.lang.c++
- Subject: Re: private base class vs. private member object
- Date: Mon, 11 Mar 1996 16:22:29 -0500
- Organization: AT&T
- Message-ID: <31449995.6A32@staff.ichange.com>
- References: <3141CB3E.5A36@staff.ichange.com> <4i19gc$85f@newsbf02.news.aol.com>
- NNTP-Posting-Host: 140.244.99.60
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
- CC: jl@staff.ichange.com
-
- JWPirie wrote:
- >
- > Remember Booch's guidelines: Inheritance (private or public) should be an
- > "is a" relationship. Member objects should be a "part of" relationship.
-
- I'm sorry but that is wrong. Public inheritance constitutes an IS-A relationship, but private inheritance most certainly
- DOES NOT. (sorry, didn't mean to shout). Private inheritance establishes an "Implemeted in terms of" relationship and is
- specifically used when you do NOT want an IS-A realtionship.
-